<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div class='app-container'>
    <el-row>
      <el-col :span='22' :xs='24'>
        <el-form ref="form" :model="s_plan_process_tech" :rules="rules" label-width="100px" id="mvcfm">
          <el-button @click="gotoPage('/mes/product/ProductTechSetStation?'+vueparams+'')" type='primary' size="mini">设定工位</el-button>
          <div class="form-unit">
            <span class="mvc-title-left"> 工序工位 </span>
          </div>
          <el-table :data="s_plan_process_tech">
            <el-table-column label="工序" prop="processid">
              <template slot-scope="scope">
                <el-link @click="gotoPage('/mes/product/SetStationProcedure?CMID5='+scope.row.processid+''+vueparams+'')" type='primary'>{{scope.row.process_name}}</el-link>
              </template>
            </el-table-column>
          </el-table>
        </el-form>
      </el-col>
      <el-col :span='2' :xs='24'>
        <el-menu default-active='active' class='menu-unit'>
          <el-menu-item v-for='item in Container'>
            <el-link @click="gotoMenu(item.url)" :type="'适用产品'===item.name?'primary':'default'">{{item.page_desc||item.name}}</el-link>
          </el-menu-item>
        </el-menu>
      </el-col>
    </el-row>
  </div>
</template>
<script>
  import request from '@/utils/request'
  export default {
    name: 'SetStationDet',
    components: {},
    props: ['popparams'],
    data() {
      return {
        vueparams: this.getVUEParams(""),
        s_plan_process_tech: [],
        loading: false,
        Container: null,
        rules: {}
      }
    },
    created() {
      this.getData();
      this.loadContainerMenu({
        pid: "28847805EE1D403DBCD43478FD18BD08",
        name: "工艺右菜单",
        selected: "适用产品"
      }, 'Container', this.vueparams);
    },
    updated() {},
    mounted() {},
    methods: {
      getData() {
        request({
          method: 'get',
          url: '/xcapi/VUEAction/mes/product/TechnologyAction/setStationDet?' + this.vueparams,
        }).then(data => {
          for (var k in data) {
            if (Array.isArray(data[k])) {
              this[k] = data[k];
            } else {
              $.extend(this[k], data[k]);
            }
          }
        })
      },
    },
  }
</script>
